import { createApp } from 'vue'
import { createPinia } from 'pinia'
import AntD from 'ant-design-vue'

import App from './App.vue'
import router from '@/router'
import PluginState from 'pinia-plugin-persistedstate'
import Icons from '@/components/icons'
import '@/permission' // 权限配置
import 'ant-design-vue/dist/antd.less'

const app = createApp(App)
const piniaApp = createPinia()

piniaApp.use(PluginState) //注册持久化插件
app.use(piniaApp)
app.use(router)
app.use(AntD)
app.use(Icons)

app.mount('#app')
